pyhton return annonymous object

40

>>> obj = type('',(object,),{"foo": 1})()
>>> obj.foo
1

Comments

Submit
0 Comments